package com.stylefeng.guns.modular.platform.model;

import java.io.Serializable;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.stylefeng.guns.common.constant.Enum.AwardsStatusEnum;
import com.stylefeng.guns.common.constant.Enum.AwardsTypeEnum;
import com.stylefeng.guns.common.constant.Enum.BuyerStatusEnum;

import java.io.Serializable;

/**
 * <p>
 * 平台奖项设置表
 * </p>
 *
 * @author stylefeng123
 * @since 2018-07-25
 */
@TableName("platform_awards")
public class Awards extends Model<Awards> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Integer id;
    /**
     * 活动id
     */
    @TableField("activity_id")
    private Integer activityId;
    /**
     * 奖项类型 0:奖金，1:金币，2奖品
     */
    private Integer type;
    @TableField(exist = false)
    private String typeName;
    public String getTypeName() {
		return AwardsTypeEnum.getDesc(this.type);
	}

	public void setTypeName(String typeName) {
		this.typeName = AwardsTypeEnum.getDesc(this.type);
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	/**
     * 奖项名称
     */
    private String name;
    /**
     * 奖项图片地址
     */
    @TableField("img_url")
    private String imgUrl;
    /**
     * 奖项数量 默认-1不限
     */
    private Integer count;
    /**
     * 奖项面值
     */
    private Double value;
    /**
     * 中奖概率
     */
    @TableField("win_rate")
    private Double winRate;
    /**
     * 奖项级别 1.一等奖， 2.二等奖， 3.三等奖， 4.四等奖， 5.五等奖， 6.六等奖，7.七等奖
     */
    private Integer rank;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 状态(0:有效，1无效)
     */
    private Integer status;
    @TableField(exist = false)
    private String statusName;
    public String getStatusName() {
		return AwardsStatusEnum.getDesc(status);
	}

	public void setStatusName(String statusName) {
		this.statusName = AwardsStatusEnum.getDesc(status);
	}

	/**
     * 创建人
     */
    @TableField("create_by")
    private String createBy;
    /**
     * 创建时间
     */
    @TableField("gmt_create")
    private Date gmtCreate;
    /**
     * 更新人
     */
    @TableField("last_updated_by")
    private String lastUpdatedBy;
    /**
     * 更新时间
     */
    @TableField("gmt_last_update")
    private Date gmtLastUpdate;
    

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getActivityId() {
        return activityId;
    }

    public void setActivityId(Integer activityId) {
        this.activityId = activityId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Double getValue() {
        return value;
    }

    public void setValue(Double value) {
        this.value = value;
    }

    public Double getWinRate() {
        return winRate;
    }

    public void setWinRate(Double winRate) {
        this.winRate = winRate;
    }

    public Integer getRank() {
        return rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(String lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public Date getGmtLastUpdate() {
        return gmtLastUpdate;
    }

    public void setGmtLastUpdate(Date gmtLastUpdate) {
        this.gmtLastUpdate = gmtLastUpdate;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Awards{" +
        "id=" + id +
        ", activityId=" + activityId +
        ", type=" + type +
        ", name=" + name +
        ", count=" + count +
        ", value=" + value +
        ", winRate=" + winRate +
        ", rank=" + rank +
        ", sort=" + sort +
        ", status=" + status +
        ", createBy=" + createBy +
        ", gmtCreate=" + gmtCreate +
        ", lastUpdatedBy=" + lastUpdatedBy +
        ", gmtLastUpdate=" + gmtLastUpdate +
        "}";
    }
}
